#include "mathvector2D.cpp"
#include <iostream>
#include <vector>
#include <list>
using namespace std;

class Ball
{
public:
    MathVector position;
    double radius;
    vector<double> RGBA;
    double hp;
    int id;
};

class Food : public Ball
{
public:
    double hp_add;
    Food(const int id, const MathVector &position)
    {
        this->id = id;
        this->position = position;
        this->radius = 5;
        this->RGBA = {0, 255, 0, 255};
        this->hp = 0;

        this->hp_add = 10;
    }
};

class SmartBall : public Ball
{
public:
    double speed;
    SmartBall();
    vector<vector<double>> obs;
    double reward;
    int done;

    SmartBall(const int id, const MathVector &position)
    {
        this->id = id;
        this->position = position;
        this->radius = 30;
        this->RGBA = {150, 50, 100, 255};
        this->speed = 10;
        this->hp = 60;
        this->done=0;
    }

    double close_damage = 10;
    int close_last = 2;
    double close_scope = 60;

    double far_damage = 1;
    int far_last = 2;
    double far_scope = 150;

    double visual_field = 300;

    vector<vector<double>> get_obs()
    {
        return obs;
    }
    double get_reward()
    {
        return reward;
    }
    int get_done()
    {
        return done;
    }
    int get_id()
    {
        return id;
    }
};

class FireBall : public Ball
{
public:
    int age;
    SmartBall* from_sb;
    double damage;
    FireBall(const int id, const MathVector &position, const double radius, const int age, SmartBall* from_sb,const double damage)
    {
        this->id = id;
        this->position = position;
        this->RGBA = {255, 0, 0, 50};
        this->radius = radius;
        this->hp = 0;
        this->age=age;
        this->from_sb=from_sb;
        this->damage=damage;
    }
};

// int main(int argc, char const *argv[])
// {
//     Food b(MathVector(0,1));

//     cout<<b.color<<"\n"<<b.position.y<<endl;
//     return 0;
// }
